<template>
  <div class="root-box">
    <div id="container"></div>
  </div>
</template>

<script>
export default {
  mounted() {
    this.mapInit();
  },
  methods: {
    mapInit() {
      const map = new AMap.Map("container", {
        zoom: 10, //级别
        center: [112.94, 28.2], //中心点坐标
        viewMode: "2D", //使用3D视图
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.root-box {
  height: calc(100vh - 70px);
  width: 100%;
  background-color: rgb(128, 133, 64);
  display: flex;
  justify-content: center;
  align-items: center;
}
#container {
  width: 100%;
  height: 100%;
  background-color: #fff;
}
</style>